﻿<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title style="color:#F00;">∑(っ °Д °;)っ</title>
    <!-- CSS文件引用 -->
    <link href="~/Content/Script/Plug/layui/css/layui.css" rel="stylesheet" />
    <link href="~/Content/Script/Plug/FontIcon/css/font-awesome.css" rel="stylesheet" />
    <link rel="icon" href="~/Content/Images/favicon.ico" type="image/x-icon" />
    <!-- JS文件引用 -->
    <script src="~/Content/Script/jquery-3.2.1.min.js"></script>
    <script>
                if (top != self) {
            parent.location.href = "@Url.Action("Index","Home",new { area="" })";
                }
    </script>
    <style>
        .msg {
            display: none;
        }
    </style>
</head>
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header ">
            <div class="layui-logo">代码库</div>
            <!-- 头部区域（可配合layui已有的水平导航） -->
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item" id="bar"><a href="#"><i class="fa fa-bars fa-2x"></i></a></li>
            </ul>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <img src="~/Content/Images/5.jpg" class="layui-nav-img" />
                        步尘
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="">基本资料</a></dd>
                        <dd><a href="">安全设置</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href=""><i class="fa fa-power-off fa-fw " style="font-size:20px;"></i></a></li>
            </ul>
        </div>

        <div class="layui-side layui-bg-black  ">
            <div class="layui-side-scroll  ">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                @Html.Raw(ViewBag.nav)
            </div>
        </div>

        <div class="layui-body">
            <!-- 内容主体区域 -->
            <iframe id="iframe" style="height:99%;width:100%;border:none;" src="@Url.Action("Default", "Home")"></iframe>
        </div>

        <div class="layui-footer" style="text-align:center;width:100%;">
            <!-- 底部固定区域 -->
            轻剑惊鸿藏锋，重剑大巧不工
        </div>
    </div>

    <script src="~/Content/Script/Plug/layui/layui.all.js"></script>
    <script>

        var iframe = $("#iframe");

        // 框架加载指定路径
        $(".layui-nav-item a").click(function () {
            iframe.prop("src", $(this).data("url"));
        });

        // 侧边栏收缩
        $("#bar").click(function () {

            $(this).removeClass("layui-this").css("transition", ".1s");

            var w = $(".layui-side").width();

            if (w > 0) {
                $(".layui-side").stop().animate({
                    "width": "0px"
                }, 100);
                $(".layui-body").stop().animate({
                    "left": "0px"
                }, 100);
                $(".layui-footer").stop().animate({
                    "left": "0px"
                }, 100);
                $(this).find("a").css("transform", "rotateZ(-90deg)");

            } else {
                $(".layui-side").stop().animate({
                    "width": "200px"
                }, 100);
                $(".layui-body").stop().animate({
                    "left": "200px"
                }, 100);
                $(".layui-footer").stop().animate({
                    "left": "200px"
                }, 100);
                $(this).find("a").css("transform", "rotateZ(0deg)");
            }


        });

        // 添加序号
        var tabItem = $(".layui-nav-tree li,.layui-nav-tree dd");
        // 添加序号
        for (var i = 0; i < tabItem.length; i++) {
            var index;
            $(tabItem[i]).hover(
                function () {
                    var html = $(this).find("i").html();
                    if (html) {
                        index = layer.tips(html, this, {
                            tips: [4, '#009688'],
                            time: 3000
                        });
                    }
                },
                function () { layer.close(index); }
            );
        }

    </script>
</body>
</html>